﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ResxLocalizationEditor {
	public partial class KeyNameDialog : Form {
		public KeyNameDialog() {
			InitializeComponent();

			RowName.KeyUp += new KeyEventHandler(RowName_KeyUp);
		}

		void RowName_KeyUp(object sender, KeyEventArgs e) {
			if (e.KeyCode == Keys.Enter) {
				button1_Click(sender, e);
			}
		}

		private void button1_Click(object sender, EventArgs e) {
			if (!string.IsNullOrEmpty(RowName.Text)) {
				this.DialogResult = DialogResult.OK;
				this.Close();
			}
		}
	}
}
